<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript" src="../static/js/jquery.js"></script>
    <script type="text/javascript" src="../static/js/bootstrap.js"></script>
    <link rel="stylesheet" href="../static/css/bootstrap.css">
    <title>123</title>
</head>
<body>

<script>
    $(function () {
        let audio;

        function voicePaly() {
            audio = "../static/audio/_.wav";
            audio = new Audio(audio);

            function play() {
                audio.play()
            }

            // 循环播放，播放结束继续播放
            $(audio).unbind("ended").bind("ended", function () {
                setTimeout(play, 200)
            })
            audio.play();
        }

        function voiceClose() {
            audio.pause();
        }

    })

</script>
</body>
</html>